const express = require('express')
const router = express.Router()
const {
  Home,
  GetUsers,
  GetUser,
  CreateUser,
  UpdateUser,
  DeleteUser,
} = require('./controllers/user')
/**
 * 路由管理
 */
router.get('/', Home)
.get('/v1/users', GetUsers)
.get('/v1/users/:id', GetUser)
.post('/v1/users', CreateUser)
.put('/v1/users/:id', UpdateUser)
.delete('/v1/users/:id', DeleteUser)

module.exports = router